//
//  turnCell.m
//  Estate
//
//  Created by wangdongdong on 16/7/12.
//  Copyright © 2016年 ttsx. All rights reserved.
//

#define LEBHEIGHT 14
#import "turnCell.h"

@implementation turnCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

+ (CGFloat)cellContentHeight:(NSString *)contents
{
    return  60  + [turnCell cellHeightWithObj:contents];
}

+ (CGFloat)cellHeightWithObj:(NSString *)string{
    CGFloat cellHeight = LEBHEIGHT;
    CGFloat mWidth = [UIScreen mainScreen].bounds.size.width - 100;
    cellHeight = [string boundingRectWithSize:CGSizeMake(mWidth,MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin  attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12]} context:nil].size.height;
    if(cellHeight<=LEBHEIGHT){
        return LEBHEIGHT;
    }else{
        return cellHeight;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
